<?php
    error_reporting(E_ALL);
    require_once("includes/includes.php");
    
    if ($_POST)  {

    $insertSql = "INSERT INTO [tbl_location]
           ([ID]
           ,[service_id]
           ,[lat]
           ,[lon]
           ,[createddate])
     VALUES
           (
           (SELECT CAST(NewID() AS UNIQUEIDENTIFIER))
           ,'".$_POST['service_id']."'
           ,'".$_POST['lat']."'
           ,'".$_POST['lon']."'
           ,GETDATE())";
    
    $DBOBJ->insert($insertSql);
    }
?>